package com.hexb.smh.entity.param.account;

import com.hexb.smh.annotations.SecretIn;
import com.hexb.smh.utils.IPasswordIn;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author : hexb
 */
@Data
@Slf4j
public class LoginParam implements IPasswordIn {
    @NotNull
    @ApiModelProperty(value = "登录名或手机号", example = "admin")
    @Size(min = 1,max = 20)
    private String loginName;

    @SecretIn
    @NotNull
    @ApiModelProperty(value = "登录名或手机号", example = "ded7e9KQqsdIfeMVNOpE13QE7q7z3isG2hCfuiEvJPBIOGt6Uab5AaWGlmzGP/pH1u/XQehFVFub5F9dCqLE3qUOaO0mPQSGhDq/rX8eN0NjcinM0FwgQpZuBXuS8T9hujNrOP98cnTqhOcvHbm/JZgFDlvX+4rbpsGabNo0Qf4=")
    private String password;

    @ApiModelProperty(value = "密码是否需要加密(RSA算法)", example = "true")
    private Boolean encrypt;

    @NotNull
    @Size(min = 4, max = 4)
    @ApiModelProperty(value = "验证码", example = "A1T1")
    private String verificationCode;

}
